Automated media storage libraries are known for providing cost effective access to large quantities of stored media. These media libraries are often interconnected with one or more host computers. Those one or more host computers write information to one or more information storage media disposed in the library, and/or read information from those one or more information storage media.
The various components of such media storage libraries often include what are sometimes referred to as “embedded” systems, applications, or devices. Such embedded systems comprise special purposes systems requiring high performance but having relatively few dedicated resources. For example, embedded devices typically comprise relatively little memory, a low performance processor, few if any standard utilities, and no hard disks.
In addition, embedded devices typically do not comprise a conventional operating system. A conventional operating system is written for flexibility. An embedded system, however, performs a single purpose. Therefore, such an embedded device operates using a device microcode written to optimize the device's single function.
A PCI card comprises such an embedded device. Such a PCI card typically includes a processor, a flash memory, and SDRAM. A FICON interface card comprises another such embedded device.
Using prior art methods, serialization is performed using “locks.” One thread obtains a lock to update or read a data structure. A second thread attempting to access the data structure must wait until the first thread completes its read/update. That second thread can then obtain the lock. These prior art methods are inefficient for structures that are updated infrequently but read frequently, such as data structures disposed in an embedded device's microcode, because the embedded device's processor must contend for the lock before being able to read the data structure.
What is needed is a method to update a data structure without first obtaining a lock. Applicant's invention includes a method to update a data structure without first obtaining a lock for that data structure.